package com.shujia.five;

public class MathDemo {

    public static void main(String[] args) {
        int abs = Math.abs(-10);
        System.out.println(abs);// 10

        double pow = Math.pow(2, 3);
        System.out.println(pow);// 8

        int max = Math.max(10, 20);
        System.out.println(max);// 20

        int min = Math.min(30, 40);
        System.out.println(min);//30

        System.out.println(Math.random());

        long round = Math.round(1.23);
        System.out.println(round); // 1

        round = Math.round(1.83);
        System.out.println(round); // 2

        double ceil = Math.ceil(1.1);
        System.out.println(ceil);// 2

        double floor = Math.floor(1.2);
        System.out.println(floor);// 1

    }
}
